home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Belgian Amiga Club - ADF Collection
/
BS1 part 41.zip
/
BS1 part 41
/
Painfull utilities 1.adf
/
27
< prev
next >
Wrap
Text File
|
1988-02-27
|
14KB
|
395 lines
--------------------------------------------------------------
TETRAPACK Version 2.1
--------------------------------------------------------------
TetraPack Version 2.1 is a new version of TetraCrunch with
rewritten memory management routines, a new decruncher and a mega
crunch option which allows crunching of programs up to $7ff00
bytes long (511.75 Kb!!). The cruncher is (and has always been)
the very best on the 'market' at this moment.
CREDITS:
User Interface, Decrunchers, Research, and Crunchers by:
ANTIACTION.
With thanks to LORD BLITTER, IL SCURO, and LASER.
INSTRUCTIONS
------------
There are actually two crunchers in TetraPack, one 'Amateur'
version, which handles normal programs in much the same way as
Byte Killer, Flash-Packer (RSI), and TetraCrunch. And then
there's a 'Professional' version, which handles programs from
$0000-$7ffff. The professional version should only be used to
pack games or demos which doesn't use the Operating System. For
example: KATAKIS, TLC POWERTRAX, PANDORA, NETHERWORLD, NEBULUS et
cetera. The name 'professional' implies that this version only
should be used by experienced programmers and crackers.
The following instructions applies both to Mega-Crunch (Pro),
and The normal crunch.
NOTE: Whenever T.P. asks for anything else than RETURN or a
hexadecimal number, you can type an asterisk (*) followed by a
command or program name to execute a command/Program, useful for
loading a monitor and alter something before crunching!!
First TetraPack asks:
Mega-Crunch (Y/N) ?
Here you simply type Y if you want megacrunch, and N if you want
normal crunch. Next, the program asks:
Low-Mem: $
Here you are supposed to enter the lowest address which your
program uses. Next, TP asks:
High-Mem: $
Here you should enter the highest address which your programs
uses. Actually you should always specify a high-mem that is
higher that the actual program's last address. (Because of the
way the first pass cruncher works). Also, another thing to take
into account when selecting high-mem's is the fact that when the
program later on is loaded from disk, it will possibly be loaded
into a position so that it overlaps the decrunch-area, to avoid
this, ALWAYS CHOOSE A HIGH-MEM OF AT LEAST $50000. THIS IS VERY
IMPORTANT!!! (USING A HIGH HIGH-MEM DOES NOT AFFECT THE PROGRAM
SIZE BY MORE THAN APPROX. 5 BYTES PER EVERY 64 KBYTES!! SO USE AS
HIGH HIGH-MEM's AS POSSIBLE!)
Next TP clears the allocated memory to obtain optimal crunching
performance. Now TetraPack asks:
Scan-Width ($10-$8000): $
This number specifies how many bytes forward the equal-sequence
packer should look for an equal sequence, the general rule is:
the higher a scan-width, the smaller program, but it will also
take longer time to crunch. However, this is not always true, as
you soon shall see the optimal scan-width is almost always $800.
When selecting a Scan-Width, do not just take one out of thin
air, like $35d or $57, these are not very efficient. No, always
use an even power of two, like $40, $80, $100, $200, $400, $800,
$1000, $2000, $4000, $8000. NOTHING INBETWEEN!!! Another rule is,
if you double the scan-width, you also double the crunching time.
The next stage is to enter all files to load into memory, so
the next question is:
Load type (r=Reloc, o=Plain, t=TrackDisk):
As you can see, there are several different types of loads, an
explanation:
R - RELOC:
This option loads a CLI executable file into a fixed location in
memory, i.e. a file saved from seka with the command WO, or the
Object file from DEVPAC. One should note, that you should not
crunch CLI commands as DIR etc. with this cruncher, for that, use
the TNM-Cruncher, ANC Cruncher, Relokit, or any similar cruncher.
So what can this load-option do?? Well, it is VERY useful when
putting demo's together, as you can save the Object code as
Relocateable (CLI) code, and then, when you are going to crunch,
you can load the code into any memory location you want. Useful
for MegaDemos (I can tell...)!!. Also, you can crunch some games
using this option, like Thundercats, for example, which is saved
as one reloc-file.
O - PLAIN:
This option simply loads a file into memory, and makes no
alterations to it's contents, I.E. you can load a text file, a
picture, a sample or anything else into memory. Works like RI in
SEKA.
T - TRACKDISK:
This option loads data straight from AmigaDOS sectors.It asks for
OFFSET, and for LENGTH, these should be entered as even multiples
of $200. The values are exactly like those put into the ExtTDIo
structure when doing bootblock loaders etc. Useful when crunching
games!!!
You can go on loading files/sectors as many times you want. When
you are finished with the loading of data, just press return, and
TetraPack will start it's REAL work...
When it is finished with the crunching, it will display how big
the crunched file is, and how many bytes was won, press RETURN to
continue.
Now TP asks you to enter the JMP/JSR address, which simply is the
starting address of your code (start of program).
When you have entered the JMP address, you will be asked:
Next TetraPack asks something like:
Flash-register: etc....
Here you choose in which color register the depacker should place
the flash values, $00 is background, $01 foreground 1 etc. To get
rid of the flashing, simply select $10. (Not used on workbench
screen). Next TetraPack asks:
PRO-DECRUNCHER? (Y/N):
If you want the 'pro' version of the decruncher, then answer yes,
if you don't, just press return, or answer no. If you select the
pro-decruncher, you will have the same decrunch-possibilities as
in the MEGA version of the cruncher.
If you are working in MEGACRUNCH mode, or if you answered yes
on the question above, you will now get some further questions,
these are described later.
At this point TetraPack asks for a name, which is the name of the
crunched file. If you don't want to save the crunched file, just
press RETURN, or enter NIL:, to avoid saving.
Next TetraPack asks if you would want to save again, answer Y or
N. If you answer No, TetraPack will ask you:
Want to run? (Y/N):
If you answer Y here, TetraPack will run the packed program with-
out reloading it. If you answer NO, TetraPack will end.
MEGACRUNCH
--------------
NOTE: Before using this option, you have to remove the fastmem
from the SYSTEM. Note: NOT physically, use the TETRAGON NoFast
program, or the C.C.S. NOFAST BOOT. No other programs will work,
because they don't remove EXEC.LIBRARY etc from fastmem.
This option needs 1 MegaByte of memory, otherwise it works
exactly as 'mini' crunch, but for these questions after
JMP-address:
DMA :
Simply the value to load $dff096 (DMACON) with before jumping to
the start of the code.
ADK :
As DMA, but the address is $dff09e (ADKCON).
INT :
As DMA & ADK, but the address is $dff09a (INTENA)
STACK :
Enter the desired stack pointer. In other words, the value to
load register A7 with.
STATUS REG.:
Enter the desired value to load SR with before jumping to start
of code.
DECRUNCHER LOCATION:
Enter the address where the decruncher is to be located, this
should be at least $40 lower than low-mem, or equal or higher
than the hi-mem. The deccruncher should though not be located at
a higher location than $7ff00.
NOTE: At the start of the decrunching, the decruncher loads
registers $dff096, $dff09a and $dff09e with $7fff, thus disabling
EVERY interrupt, all DMA and clears all ADK stuff. Therefore, you
will have to enable ALL interrupts, DMA, and ADK in the program,
or by setting the appropriate bits in the values entered in the
cruncher. Most games, however, should be entered with all this
stuff disabled.
NOTE II: The mega-decruncher also turns off the drive motor
before starting the decrunching.
RESULTS
---------
How efficient is the TetraPacker compared to other packers???
Well, here's some figures aquired crunching Katakis with
megacrunch on, and crunching with mega-pack in Flashpacker and
also the sizes aquired when crunching with Byte-Killer. One
should note that the only version that worked by just crunching
it straight away, without any patches or transferrers was, yes,
TETRAPACK!!!
Scan-W. TP-TIME/Size RSI-Time/Size Byte-Time/Size
$0080 1:00, 89252 1:10,92908 1:00, 96224
$0100 1:40, 87112 1:50,89168 1:45, 91216
$0200 3:00, 85132 3:15,86828 3:10, 88124
No time to check $0400 out!!!
$0800 11:20, 84660 11:30,85216 12:05, 86704
$1000 22:00, 84812 22:10,85216 Not Available
$2000 43:40, 85108 Not tested Not Available
By these figures we can quite easily see that TETRAPACK is THE
BEST!! Just compare TP's $0200 to ByteKiller's and RSI's $0800 -
better result, but only taking one fourth of the time!!!
We can also see, that $0800 is the very best ScanWidth to choose,
because when a bigger value is chosen, the files also become
bigger!!
EXAMPLE
---------
If you want to check this out by yourself, then the file
'Katakis.c0' lies on this disk, it contains all the code on the
first Katakis diskette. Use the following parameters:
IF YOU HAVE 1MB:
Execute 'NoFast'. (Disables system use of FASTMEM)
MEGACRUNCH: YES
Lo-Mem: $c0
Hi-Mem: $78000
Scan-Width: $xxx
Load-Type: o
FileName: df0:Katakis.c0
Load-Address: $c0
JMP-Address: $c0
Flash-Register: $00
DMA: $7fff
INT: $7fff
ADK: $7fff
Status: $2700
Stack: $7fffe
Decruncher: $7f000
FileName: xxxx
IF YOU HAVE 512K:
------------------
MEGACRUNCH: NO
Lo-Mem: $c0
Hi-Mem: $50000
Scan-Width: $xxx
Load-Type: o
FileName: df0:Katakis.c0
Load-Address: $c0
JMP-Address: $c0
Flash-Address: $00
PRO-DECRUNCHER: YES
DMA: $7fff
INT: $7fff
ADK: $7fff
Status: $2700
Stack: $7fffe
Decruncher: $7f000
FileName: xxxx
Run it, insert Katakis datadisk in DF0:, then watch it run!!
HINTS AND TIPS...
-------------------
x Read this instruction through before using the packer to avoid
misunderstandings.
x If you only have 512K, and a program is too big to be crunched
(Fails to allocate memory), try using a program like Add21K,
also called RemBP. If this fails, disconnect all extra drives
and when re-booting hold down CTRL and D simultaneously, when
1> appears, run Add21K, then type TetraPack and try crunching
your program again.If this fails, then there's nothing more to
do!
x If you are working on a project and need to crunch it now and
then, why not write a TetraPack SCRIPT file?? Enter a editor
like TXEd (lies on this disk) or Ed on WorkBench, and type in
your info like this: (separated with RETURN's)
USE NO EMPTY LINES BETWEEN PARAMETERS (except when the inst-
ructions tell you).
Y or N (MegaPack desired??)
LoMem (in hex, don't include $)
HiMem (also in hex, don't include $)
Scan-Width (as above)
for each file/sectors:
T/O/R (Track, Ordinary, or Reloc)
FileName (not when doing TrackLoad)
LoadAddress (in hex, no $ included)
and if TrackLoad:
Offset (as above)
Length (as above)
(Two blank lines here to end file/track loading)
JMP-address (in hex, no $ included)
FlashRegister (as above)
If not MEGACrunch: Y or N (Use MEGA-depacker??)
If MEGACrunch or MEGADepack:
DMACON (DMA ENABLES)
INTENA (INT ENABLES)
ADKCON (ADK ENABLES)
Status (SR Value)
Decruncher (Decruncher location)
And then:
SaveFileName (save filename)
Y/N (Save again? (NO!))
Y/N (Want to run when saved???)
Save the file, and then, when you want to crunch using the SCRIPT
file, enter:
TetraPack <SCRIPTFILENAME (That is, type the name of your
scriptfile instead of SCRIPTFILENAME...)
THE LAST WORDS:
---------------
If you have an idea for a new feature, or if you (against all
odds) FIND A BUG! in TetraPack, then write or phone to:
STEFAN BOBERG
TYNNE BJORKE
62023 ROMAKLOSTER
SWEDEN
Tel: (+43) 0498-54076
AT ONCE!!
THE VERY LAST WORD...
LOOK OUT FOR TETRAPACK VERSION 3.0, MUCH IMPROVED VERSION!!!
(The ultimate?)
ALSO LOOK OUT FOR RELPACK VERSION 1.1...
Signed: AntiAction of TETRAGON.
Final note: There is a BUGGED version of TetraPack in circulation,
the version is 2.0, please, delete that one and replace it with
this one instead!! It lied on a release diskette which was just
a workdisc, it contained a faulty version of TetraPack, Reloc.
does NOT work!!! (and it doesn't contain all the features of 2.1)